<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('加载订单生成检测')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-ncCheck-edit" th:object="${ncCheck}">
            <input id="checkId" name="checkId" th:field="*{checkId}"  type="hidden">
			<input id="status" name="status" value="3"  type="hidden">
			<input id="cforderId" name="cforderId" th:value="*{cforderId}"  type="hidden">
			<div class="form-group">
				<label class="col-sm-3 control-label">蔬菜批次：</label>
				<div class="col-sm-8">
					<input id="piciCode" name="piciCode" readonly th:field="*{piciCode}" class="form-control" type="text">
				</div>
			</div>


			<div class="form-group">	
				<label class="col-sm-3 control-label">抑制率(%)：</label>
				<div class="col-sm-8">
					<input id="yzl" name="yzl" th:field="*{yzl}" required class="form-control" type="number" step="0.01" >
				</div>
			</div>


			<div class="form-group">
				<label class="col-sm-3 control-label">检测结果：</label>
				<div class="col-sm-8">
					<select name="checkResult" th:field="*{checkResult}"  required class="form-control m-b" th:with="type=${@dict.getType('check_result')}">
						<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}" th:field="*{checkResult}"></option>
					</select>
				</div>
			</div>

			<div class="form-group">	
				<label class="col-sm-3 control-label">检测时间：</label>
				<div class="col-sm-8">
					<input id="checkTime"  data-format="yyyy-MM-dd HH:mm:ss" required name="checkTime" th:value="*{#dates.format(checkTime, 'yyyy-MM-dd hh:mm:ss')}" class="form-control" type="text" th:class="time-input" >
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">检测人员：</label>
				<div class="col-sm-8">
					<input id="checkUser" name="checkUser" th:field="*{checkUser}" class="form-control" type="text">
				</div>
			</div>

			<div class="form-group">	
				<label class="col-sm-3 control-label">备注：</label>
				<div class="col-sm-8">
					<textarea id="remark" rows="3" name="remark" th:field="*{remark}" class="form-control" type="text"></textarea>
				</div>
			</div>
		</form>
    </div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "system/ncCheck";
		$("#form-ncCheck-edit").validate({
			rules:{
				xxxx:{
					required:true,
				},
			},
			focusCleanup: true
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/add", $('#form-ncCheck-edit').serialize(),function (result) {
                    parent.reload();
                });
	        }
	    }
	</script>
</body>
</html>
